//
//  PageTypeModel.swift
//  SimpleCal
//
//  Created by 杜晓祥 on 2021/10/28.
//

import Foundation

struct PageTypeModel {
    var pageType:PageSwitchEnum = .DAY
    var yearStart:Int = 0
    var yearEnd:Int = 0
    var month:Int = 0
}

extension PageTypeModel {
    
    func toString() -> String {
        switch self.pageType {
        case .MONTH:
            return "\(yearStart)年"
        case .YEAR:
            return "\(yearStart)-\(yearEnd)"
        case .MANY_YEAR:
            return "\(yearStart)-\(yearEnd)"
        case .DAY:
            return ""
        }
    }
    
}
